import java.io.File;


public class Rename {

	private static String DIR_NAME = "C:/Users/Seb/Documents/Audacity/_basic";
	private static String[] FILES_ENDS = new String[] {".flv", ".avi", ".mp4", ".wmv"};
	
	public static void main(String[] args) {
		File dir = new File(DIR_NAME);
		File[] files = dir.listFiles();
		
		for (int i = 0; i < files.length; i++) {
			File current = files[i];
			boolean changed = false;
			for (int j = 0; (j < FILES_ENDS.length) && !changed; j++) {
				String name = current.getName();
				if (name.endsWith(FILES_ENDS[j])) {
					current.renameTo(new File(current.getParentFile(),
						name.substring(0, name.length() - 4) + ".vdo"));
				}
			}
		}
	}
}
